package com.smart.community.work.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 消息通知VO
 *
 * @author Wu.Liang
 * @since 2025-01-30
 * @version 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "消息通知VO")
public class NotificationVO {

    @Schema(description = "发送人ID", example = "1")
    private Long senderId;

    @Schema(description = "接收人ID", example = "2")
    private Long receiverId;

    @Schema(description = "物业公司ID", example = "1")
    private Long propertyCompanyId;

    @Schema(description = "消息标题", example = "请假申请审批通知")
    private String title;

    @Schema(description = "消息内容", example = "您有一个请假申请需要审批")
    private String content;

    @Schema(description = "消息类型：0-系统通知，1-任务通知，2-审批通知，3-普通消息", example = "2")
    private Integer type;

    @Schema(description = "消息类型名称", example = "审批通知")
    private String typeName;

    @Schema(description = "阅读状态：0-未读，1-已读", example = "0")
    private Integer status;

    @Schema(description = "阅读状态名称", example = "未读")
    private String statusName;

    @Schema(description = "关联业务ID（如工单ID，请假ID等）", example = "123")
    private Long relatedId;

    @Schema(description = "关联业务类型", example = "LEAVE")
    private String relatedType;

    @Schema(description = "是否紧急", example = "false")
    private Boolean urgent;

    @Schema(description = "是否置顶", example = "false")
    private Boolean pinned;

    @Schema(description = "过期时间", example = "2025-02-28 23:59:59")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;

    @Schema(description = "发送人姓名", example = "张三")
    private String senderName;

    @Schema(description = "接收人姓名", example = "李四")
    private String receiverName;

    @Schema(description = "发送人部门", example = "人事部")
    private String senderDepartment;

    @Schema(description = "接收人部门", example = "客服部")
    private String receiverDepartment;

    @Schema(description = "发送人头像", example = "http://example.com/avatar.jpg")
    private String senderAvatar;

    @Schema(description = "接收人头像", example = "http://example.com/avatar.jpg")
    private String receiverAvatar;

    @Schema(description = "是否已过期", example = "false")
    private Boolean expired;

    @Schema(description = "距离过期时间（小时）", example = "24")
    private Long hoursToExpire;

    @Schema(description = "是否可删除", example = "true")
    private Boolean canDelete = false;

    @Schema(description = "是否可标记为已读", example = "true")
    private Boolean canMarkAsRead = false;
}
